package com.example.demo.config.producer;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author yongen
 * @description: 生产者配置映射
 * @date 2022/2/9 2:25 PM
 */
@Component
@ConfigurationProperties("rocketmq.producer")
public class RocketMQProducerProperties {

  private String namesrvAddr;
  private String group;
  private int sendMsgTimeout;
  private int retryTimesWhenSendAsyncFailed;

  public String getNamesrvAddr() {
    return namesrvAddr;
  }

  public void setNamesrvAddr(String namesrvAddr) {
    this.namesrvAddr = namesrvAddr;
  }

  public String getGroup() {
    return group;
  }

  public void setGroup(String group) {
    this.group = group;
  }

  public int getSendMsgTimeout() {
    return sendMsgTimeout;
  }

  public void setSendMsgTimeout(int sendMsgTimeout) {
    this.sendMsgTimeout = sendMsgTimeout;
  }

  public int getRetryTimesWhenSendAsyncFailed() {
    return retryTimesWhenSendAsyncFailed;
  }

  public void setRetryTimesWhenSendAsyncFailed(int retryTimesWhenSendAsyncFailed) {
    this.retryTimesWhenSendAsyncFailed = retryTimesWhenSendAsyncFailed;
  }
}
